/*
**********************************************************************************
 ECE 527 Project 3
 Module: ling16_adder
 Description: Implementation of 16 bit Ling's adder 

 Team : Rohit Kulkarni
        Akshay Kotian
**********************************************************************************
*/

//***** 16-bit ling adder *******
module ling16(sum,Cout,a,b,Cin);                                                                               
output [15:0] sum;               
output Cout;                 
input [15:0] a;               
input [15:0] b;               
input Cin;                                                                                                
wire [2:0] carry;         // intermediate carry between each 4 bit adders                                                                      

ling4 l1(sum[3:0],carry[0], a[3:0],b[3:0],Cin);
ling4 l2(sum[7:4],carry[1], a[7:4],b[7:4],carry[0]);
ling4 l3(sum[11:8],carry[2], a[11:8],b[11:8],carry[1]);
ling4 l4(sum[15:12],Cout,a[15:12],b[15:12],carry[2]);

endmodule
